package cn.gorit.common.enums;

/**
 * @Classname StateEnums
 * @Description 状态码枚举，所有的状态码都在这里
 * @Date 2020/9/21 15:07
 * @Created by CodingGorit
 * @Version 1.0
 */
public enum StateEnums {
    /**
     * 逻辑删除状态
     * -1 适用于通用查询中，显示数据的与否
     */
    DELETED(1,"已删除"),
    NOT_DELETED(0,"未删除"),
    LOGIC_DELETED(-1,"已逻辑删除"),

    /**
     * 启用状态
     */
    ENABLED(1,"已启用"),
    DISABLE(0,"已禁用"),


    /**
     * 留言板状态
     */
    REPLYED(2,"已回复"),
    ALLOWED(1,"审核通过"),
    CHECKED(0,"审核中"),

    /**
     * 请求访问状态枚举
     */
    REQUEST_SUCCESS(1, "请求正常"),
    REQUEST_ERROR(0, "请求异常"),

    /**
     * 用户标识。
     * 0表示管理员，1表示普通用户
     */
    ADMIN(0, "管理员"),
    USER(1, "普通用户"),

    /**
     * 用户冻结情况
     */
    FREEZE_SUCCESS(0,"冻结成功"),
    FREEZE_FAILED(-1,"冻结失败"),

    /**
     * 用户订阅，回关逻辑
     */
    FOLLOW_USER(1,"回关成功"),
    CANCEL_FOLLOW_USER(0,"已取消回关"),

    /**
     * 文章置顶
     */
    ENABLE_TOP(1,"已经开启置顶"),
    DISABLE_TOP(0,"已经关闭置顶"),

    /**
     * 资源类型 1 图片类
     * 资源类型 2 视频类
     */
    SOURCE_IMAGE(1,"images/"),
    SOURCE_VIDEO(2,"videos/")
    ;


    private Integer code;
    private String msg;

    StateEnums(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
